package com.sumainfor.pc.market.service;

import com.sumainfor.pc.market.dao.RdFacilityMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 设备
 */
@Service
public class RdFacilityService implements Serializable {

    private ReentrantLock lock = new ReentrantLock(false);

    Logger log = LoggerFactory.getLogger(RdFacilityService.class);// 日志

    @Autowired
    private RdFacilityMapper rdFacilityMapper;
    /*
     * 根据项目的周边设备编号查询集合
     * */
   public List<Map<String,Object>> getFacilityListByFaid(Map<String,Object> params){
       System.out.println("房源周边params:"+params);
       if(params.get("Facility")!=null){
           if (params.get("Facility").toString().equals("")) {//房源状态
               params.put("FaIdList", null);
           }else{
               params.put("FaIdList", params.get("Facility").toString().split(","));
           }
       }
       return rdFacilityMapper.getFacilityListByFaid(params);
    }
}
